<template>
    <!-- components/navigate/searchCity/index.wxml -->
    <view :style="'width:100vw;height:' + navHeight + 'px; background-color: ' + bgColor + ';opacity:' + opacity">
        <view class="title_layout" :style="'margin-top:' + navTop + 'px;height: ' + navContentHeight + 'px;width: ' + navSafeWidth + 'px;'">
            <van-icon v-if="true" class-prefix="iconfont" name="fanhuitubiao" :color="iconColor" size="22px" class="back_icon" @tap.native="navBackFun"></van-icon>
            <city-search
                custom-class="searcher_class"
                background-color="transparent"
                :placeholder="placeholder"
                v-model="value"
                :district="district"
                :input-disabled="true"
                @onSelectCity="onSelectCity"
                @onTapInput="onTapInput"
                @onSearch="onSearch"
            ></city-search>
        </view>
    </view>
</template>

<!-- <script>
import citySearch from '@/components/search/city/index';
// components/navigate/searchCity/index.js
export default {
    components: {
        citySearch
    },
    data() {
        return {
            navHeight: '',
            navTop: '',
            navContentHeight: '',
            navSafeWidth: '',
            iconColor: ''
        };
    },
    mixins: [require('@/behaviors/navi-behavior')],
    props: {
        value: {
            type: String,
            default: ''
        },
        district: {
            type: String,
            default: '地区'
        },
        placeholder: {
            type: String,
            default: '请输入搜索内容'
        },
        inputDisabled: {
            type: Boolean,
            default: false
        },
        bgColor: {
            type: String,
            default: 'transparent'
        },
        opacity: {
            type: Number,
            default: 0.9
        }
    },
    methods: {
        /**
         * 返回上一页
         */
        navBackFun() {
            uni.navigateBack({
                delta: 1
            });
        },

        /**
         * 点击地区选择按钮触发的事件
         */
        onSelectCity() {
            this.$emit('onSelectCity', {
                detail: {}
            });
        },

        /**
         * 点击输入框
         */
        onTapInput() {
            this.$emit('onTapInput', {
                detail: {}
            });
        },

        onSearch() {
            console.log('占位：函数 onSearch 未声明');
        }
    },
    created: function () {}
};
</script> -->
<style>
@import './index.css';
</style>
